package com.wongoing.apiclient.alipay;

import java.io.IOException;
import java.util.Map;

import javax.xml.bind.JAXBException;

import com.wongoing.apiclient.alipay.query.Alipay;

public class AlipayManagerImpl implements IAlipayManager{

	@Override
	public String alipayWebScanQrCodePay(String WIDout_trade_no, String WIDtotal_amount, String WIDsubject, String WIDbody,
			String resturnUrl, String ip) throws IOException, JAXBException {
		return AlipayHelper.payResult(WIDout_trade_no, WIDtotal_amount, WIDsubject, WIDbody, resturnUrl, ip, "");
	}

	@Override
	public Map<String, String> alipayRefund(String WIDbatch_no, String WIDrefund_date, String WIDbatch_num,
			String WIDdetail_data, String notify_url) throws Exception {
		return AlipayHelper.payRefundToMap(WIDbatch_no, WIDrefund_date, WIDbatch_num, WIDdetail_data, notify_url);
	}

	@Override
	public Alipay alipayQueryToBean(String WIDtrade_no, String WIDout_trade_no) throws Exception {
		return AlipayHelper.payQueryToBean(WIDtrade_no, WIDout_trade_no);
	}

	@Override
	public String alipayUnionPay(String WIDout_trade_no, String WIDtotal_amount, String WIDsubject, String WIDbody,
			String WIDdefaultbank, String ip, String WIDShowUrl, String resturnUrl) throws IOException, Exception {
		return AlipayHelper.payWithBank(WIDout_trade_no, WIDtotal_amount, WIDsubject, WIDbody, WIDdefaultbank, ip, WIDShowUrl, resturnUrl);
	}

	
	
}
